CurrencyTransaction
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
Product | SRRisk |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
transactionID | BIGINT | PRI | 0 | |
tradeDate | DATE | PRI | '1900-01-01' | |
accnt | VARCHAR(16) | '' | ||
clientFirm | VARCHAR(16) | '' | ||
botCurrency | enum - Currency | 'None' | ||
botQuantity | DOUBLE | 0 | ||
sldCurrency | enum - Currency | 'None' | ||
sldQuantity | DOUBLE | 0 | ||
comment | TINYTEXT | '' | ||
transactionDttm | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
transactionID | 1 |
tradeDate | 2 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRRisk`.`MsgCurrencyTransaction` (
`transactionID` BIGINT NOT NULL DEFAULT 0,
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`botCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`botQuantity` DOUBLE NOT NULL DEFAULT 0,
`sldCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`sldQuantity` DOUBLE NOT NULL DEFAULT 0,
`comment` TINYTEXT NOT NULL DEFAULT '',
`transactionDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`transactionID`,`tradeDate`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`transactionID`,
`tradeDate`,
`accnt`,
`clientFirm`,
`botCurrency`,
`botQuantity`,
`sldCurrency`,
`sldQuantity`,
`comment`,
`transactionDttm`,
`timestamp`
FROM `SRRisk`.`MsgCurrencyTransaction`
WHERE
/* Replace with a BIGINT */
`transactionID` = 1234567890
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01';
Doc Columns Query
SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='CurrencyTransaction' ORDER BY ordinal_position ASC;